import { lazy } from "react";
import { WapHomeO,Graphic ,OrdersO,DiamondO,Contact} from '@react-vant/icons';
// import Home from "../pages/home/Home";
import Login from "../pages/login/Login";
import Mylaout from "../pages/mylaout/Mylaout";
import City from "../pages/city/City";


let Message=lazy(()=>import('../pages/message/Message'))
let Props=lazy(()=>import('../pages/props/Props'))
let Home=lazy(()=>import('../pages/home/Home'))
let User=lazy(()=>import('../pages/user/User'))
let Dd=lazy(()=>import('../pages/dd/Dd'))

export  const homerouter=[
    {
        path:'/',
        element:<Home/>,
        title:'首页',
        icon:<WapHomeO  />
    },
     {
        path:'/props',
        element:<Props/>,
        title:'出行服务',
        icon:<Graphic  />
    }, {
        path:'/dd',
        element:<Dd/>,
        title:'订单',
        icon:<OrdersO  />
    }
    , {
        path:'/message',
        element:<Message/>,
        title:'铁路会员',
        icon:<DiamondO  />
    }
    , {
        path:'/user',
        element:<User/>,
        title:'我的',
        icon:<Contact  />
    }
]

const router=[
    {
         path:'/',
        element:<Mylaout/>,
        children:homerouter
    },
       {
         path:'/login',
        element:<Login/>,
    },
       {
         path:'/city/:type',
        element:<City/>,
    },
]

export default router